package com.smartkey.receiver;

import com.smartkey.service.BootService;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BootReceiver extends BroadcastReceiver {

	private static final String TAG = "BootReceiver";

	private static final Intent INTENTSERVICE = new Intent();
	public static final String ACTION_RUNBACK = "com.smartkey.backservice";
	static {
		INTENTSERVICE.setAction(ACTION_RUNBACK);
	}

	@Override
	public void onReceive(Context context, Intent intent) {
		// context.stopService(INTENTSERVICE);
		Log.d(TAG, "boot...");
		Intent service = new Intent();
		service.setClass(context, BootService.class);
		context.startService(service);
	}

}
